This invention relates to networks and more particularly to a method and device for automatically obtaining a valid IP configuration in a LAN and a test instrument for networks.
In switched network configurations, issues arise related to how to obtain an IP address for a device connected to the network and how to confirm the validity of IP addresses of devices on the network. Since in a switched environment, any given port will only see limited traffic passing by, (typically only traffic that is directed to that port), the amount of observable data is limited. Or, often, only broadcast traffic will be visible at the port to which a device is connected.
A device desires to select a valid IP address to use in operating on the network. However, because incorrect subnet mask and mis-configured IP addresses continue to occur on modern networks, it can be difficult to identify correct local address ranges, since conflicting and overlapping results may be obtained by observing network traffic. If an address is accidentally selected by a device that is already in use by another device on the network, the inadvertent selection of that IP address will result in other network devices incorrectly updating their address caches, which may result in traffic intended for the original valid owner of that IP address being lost or mis-delivered. This is highly undesirable, especially for a test instrument, which should not itself cause problems on the network.
Further, selection of a proper subnet mask and default router by a device is essential, because if the mask and router are not correct, the device won""t communicate properly with other devices on the network. Selection of a proper domain name server (DNS) is important, too. The domain name server returns an IP address that corresponds to a symbolic name that is easier for a user to remember than a cryptic IP address would be. An improper DNS selection will not allow name resolution to occur if the DNS does not know the IP address associated with the particular name. The device might not even be able to communicate with the improper DNS selection.
A particular network may employ subnet masks, wherein IP addresses are masked with a mask value to obtain a range of IP address (e.g. A.B.C.64 through A.B.C.127). Valid IP addresses on this subnet have the last part of the address in the range 64-127. If a test instrument (or other device) does not employ an IP address within that range (e.g. A.B.C.250, which is outside the 64-127 range), replies from other devices on the network will not come back to the device because other devices sill send the packets to a router to forward to the network that the IP address should reside on (A.B.C.250 in this example) and the data won""t be received by the device.
In the past, a single contiguous range of IP addresses would be used on a given network, and IP addresses outside that range had to go through a router. However, it is now common to have many non-contiguous IP address ranges on the same network cable. Determining which range is valid can be difficult.
Prior test devices required a user to supply an IP address for the device to use, requiring a level of knowledge of the network, and, relying on the hope that no devices were improperly configured with an invalid IP address.
Having two or more devices with duplicate IP addresses can result in intermittent network problems. On an Ethernet, for example, IP addresses are resolved to hardware address (the address of the MAC (media access controller)). Individual devices will maintain an ARP cache (address resolution protocol) of the MAC addresses (typically 48 bits), to avoid having to ARP each time the network is to be accessed. Performing an ARP for an IP address that is in use by more than one host on the network will result in multiple replies and indeterminate updating of the ARP caches of other hosts on the network. So, frames transmitted to the duplicate IP address will go to the wrong device part of the time, since the MAC address in the ARP cache is changing often. Then, occasionally, a host will have its ARP cache updated so the mapping of the IP addresses to the MAC addresses now shows the xe2x80x9cdesired ownerxe2x80x9d of the IP address. At that time, the ARP cache update results in transmissions going to the proper device. So, for no readily apparent reason (to the user), communications will inadvertently start working again. Such situations are to be avoided if at all possible, as the test instrument should not corrupt the network.
In accordance with the invention, a method for obtaining an IP configuration automatically when a configuration is not obtainable by DHCP (Dynamic Host Configuration Protocol), traffic is continuously monitored to identify local addresses, corresponding subnet masks, local routers and servers. The information collected is stored in a database and after a period of time, valid and invalid IP subnets are determined.
Accordingly, it is an object of the present invention to provide an improved network test instrument that automatically obtains a valid IP configuration without corruption of other network hosts or the like.
It is a further object of the present invention to provide an improved method for automatically obtaining a valid IP configuration for any portable networking device.
The subject matter of the present invention is particularly pointed out and distinctly claimed in the concluding portion of this specification. However, both the organization and method of operation, together with further advantages and objects thereof, may best be understood by reference to the following description taken in connection with accompanying drawings wherein like reference characters refer to like elements.